From 96727f714845b5c2ea034860f3773e46612adc39 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 24 Dec 2010 08:38:22 +0000 Subject: [PATCH] x86 xsave: Enable xsave_feature[62] (AMD Lightweight Profiling) The spec of LWP is available at http://developer.amd.com/cpu/lwp/Pages/default.aspx. Signed-off-by: Wei Huang --- xen/include/asm-x86/i387.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/include/asm-x86/i387.h b/xen/include/asm-x86/i387.h index 471747c7c4..4cb67d482c 100644 --- a/xen/include/asm-x86/i387.h +++ b/xen/include/asm-x86/i387.h @@ -22,11 +22,12 @@ void xsave_init(void); int xsave_alloc_save_area(struct vcpu *v); void xsave_free_save_area(struct vcpu *v); -#define XSTATE_FP (1 << 0) -#define XSTATE_SSE (1 << 1) -#define XSTATE_YMM (1 << 2) +#define XSTATE_FP (1ULL << 0) +#define XSTATE_SSE (1ULL << 1) +#define XSTATE_YMM (1ULL << 2) +#define XSTATE_LWP (1ULL << 62) /* AMD lightweight profiling */ #define XSTATE_FP_SSE (XSTATE_FP | XSTATE_SSE) -#define XCNTXT_MASK (XSTATE_FP | XSTATE_SSE | XSTATE_YMM) +#define XCNTXT_MASK (XSTATE_FP | XSTATE_SSE | XSTATE_YMM | XSTATE_LWP) #define XSTATE_YMM_OFFSET (512 + 64) #define XSTATE_YMM_SIZE 256 #define XSAVEOPT (1 << 0) -- 2.30.2